-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shelter: show icon in header and footer (DEV-1177) #801
Conversation
Reviewer's Guide by SourceryThis pull request implements the display of the Better Angels logo in the header and footer of the Shelter web application. Class diagram showing updated component structureclassDiagram
class Header {
+render() ReactElement
}
class Footer {
+render() ReactElement
}
class BetterangelsLogoIcon {
+render() ReactElement
}
Header --> BetterangelsLogoIcon : uses
Footer --> BetterangelsLogoIcon : uses
note for BetterangelsLogoIcon "New SVG icon component"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tglaz - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
return <header className={parentCss}>hello shelter-app</header>; | ||
return ( | ||
<header className={parentCss}> | ||
<div className="flex items-center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider extracting the logo and text into a shared component to avoid duplication with the footer
This would make the codebase more maintainable and ensure consistent branding across components.
Suggested implementation:
import { ReactElement } from 'react';
import { BrandLogo } from '../components/BrandLogo';
<BrandLogo size="small" />
You'll need to:
- Create a new file
apps/shelter-web/src/app/components/BrandLogo.tsx
with this content:
import { BetterangelsLogoIcon } from '@monorepo/react/icons';
type BrandLogoProps = {
size?: 'small' | 'large';
};
export function BrandLogo({ size = 'small' }: BrandLogoProps): ReactElement {
const logoHeight = size === 'small' ? 'h-4' : 'h-8';
return (
<div className="flex items-center">
<BetterangelsLogoIcon className={`${logoHeight} text-brand-yellow`} />
<div className="text-white flex ml-2 text-sm">
<div className="font-normal">Shelters</div>
<div className="font-semibold">LA</div>
</div>
</div>
);
}
- Update the footer component to use:
<BrandLogo size="large" />
This creates a reusable component that maintains consistency while allowing for different sizes in different contexts.
<div className="font-semibold">LA</div> | ||
</div> | ||
</div> | ||
<div className="mt-6 border-t-[0.5px] border-white pt-6 flex justify-end"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider using a standard border width instead of 0.5px for better cross-browser consistency
Sub-pixel values can render inconsistently across different browsers. Consider using 1px or a standard Tailwind border width class.
<div className="mt-6 border-t-[0.5px] border-white pt-6 flex justify-end"> | |
<div className="mt-6 border-t border-white pt-6 flex justify-end"> |
8826e58
to
eed4494
Compare
eed4494
to
bc631fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tglaz ! Definitely looks better with the logo. When we do the official header and footer tickets with the designs we'll do any design clean up.
As a shelter-web user, I want to recognize the app by its logo
https://betterangels.atlassian.net/browse/DEV-1177
preview at: https://shelter.dev.betterangels.la/logo
Notes:
SheltersLA
text to match branding (in separate ticket)Summary by Sourcery
New Features: